Add photo/video gallery from Parro messages#8
Merged
Conversation
Nieuwe Foto's-tab (galerij + lightbox + download). De bijlagen die gwillem/parro al naar ~/.cache/parro/ downloadt worden door een nieuw agent-script (fotos.mjs) naar een private Supabase-bucket geüpload; de frontend toont ze via tijdelijke signed URLs, alleen voor gezinsleden. - supabase/schema.sql: parro_fotos-tabel + RLS + private bucket 'parro-fotos' - agent/fotos.mjs + db.mjs-helpers; ingehaakt in run.sh en package.json - index.html: Foto's-tab, galerij per dag, lightbox met download - docs bijgewerkt (CLAUDE.md, agent/README.md, supabase/README.md) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0149Bcafp6Q3HgKXV2nQmqEF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a new "Foto's" (Photos) tab to the Parro dashboard that displays images and videos extracted from Parro messages in a gallery view with lightbox and download functionality.
Summary
This PR introduces end-to-end photo/video handling for the Parro dashboard:
fotos.mjs): Extracts attachments from Parro messages, locates cached files downloaded by theparroCLI, and uploads them to a private Supabase Storage bucketparro_fotostable stores metadata (filename, content type, date) with foreign key to items; privateparro-fotosstorage bucket with RLS policy restricting access to family membersKey changes
agent/fotos.mjs(new): Processes attachments from raw Parro JSON, finds locally cached files in~/.cache/parro/<guardian>/, uploads to storage, and inserts metadata rowssupabase/schema.sql: Addsparro_fotostable, privateparro-fotosstorage bucket, RLS policies, and indexesindex.html:parro_fotostable changesagent/db.mjs: New helper functions (getItemsMetRaw,bestaandeFotoIds,uploadFoto,insertFoto) for the fotos agentagent/run.sh: Integratedfotos.mjsinto the sync pipeline (aftersync.mjs, beforeenrich.mjs)CLAUDE.md,agent/README.md, andsupabase/README.mdto describe the photo workflowImplementation notes
parroCLI's cache (~/.cache/parro/) to avoid needing OAuth tokens; it searches by message ID and filename or falls back to index-based matchinghttps://claude.ai/code/session_0149Bcafp6Q3HgKXV2nQmqEF